﻿using System;
using System.Collections.Generic;
using System.Text;
using Windows.UI.Xaml.Data;

namespace Reference.Apps.Converters
{
    public class LangToLanguageConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            string lang = value as String;
            string llang = String.Empty;
            switch (lang)
            {
                case "cpp":
                    llang = "C++";
                    break;
                case "cs":
                    llang = "C#";
                    break;
                case "java":
                    llang = "Java";
                    break;
                default:
                    llang = "?";
                    break;
            }
            return llang;
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
